<!DOCTYPE html>
<html lang="en">
    <head>
		<meta charset="UTF-8">
		<title>提现审核</title>
		<link rel="stylesheet" href="__ADMIN_PATH__/component/pear/css/pear.css" />
	</head>
	<body>
		<form class="layui-form" action="">
			<div class="mainBox">
				<div class="main-container">

					<div class="layui-form-item">
						<label class="layui-form-label"><font color="red">*</font>申请类型</label>
						<div class="layui-input-block">
							<input type="text" name="juese" value="{$info['juese']},{$info['juese_name']}" disabled="disabled" title="申请类型" />
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label"><font color="red">*</font>申请用户</label>
						<div class="layui-input-block">
							<input type="text" name="user_name" value="{$info['user_id']},{$info['user_name']}" disabled="disabled" title="申请用户" />
						</div>
					</div>

					<div class="layui-form-item">
						<label class="layui-form-label"><font color="red">*</font>渠道备注</label>
						<div class="layui-input-block">
							<input type="text" name="qu_content" value="{$info['qu_content']}" title="渠道备注" />
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label"><font color="red">*</font>渠道比例</label>
						<div class="layui-input-block">
							<input type="text" name="user_bl" value="{$info['user_bl']}" title="渠道比例" />
						</div>
					</div>
					{if $info['juese'] ==2}
					<div class="layui-form-item" >
						<label class="layui-form-label"><font color="red">*</font>绑定业务员</label>
						<div class="layui-input-block">
							<select name="g_uid">
								<option value=""> 选择业务员</option>

								{foreach name="yewu_list" item="value"}
								<option value="{$value['id']}" {if ($info['g_uid'] == $value['id'])} selected = "selected"{/if}>{$value['qu_content']}</option>
								{/foreach}
							</select>
						</div>
					</div>
					{/if}
					<div class="layui-form-item">
						<label class="layui-form-label"><font color="red">*</font>审核意见</label>
						<div class="layui-input-block">
							<input type="radio" name="status" value="1" title="通过" />
							<input type="radio" name="status" value="2" title="不通过" />
						</div>
					</div>

					
				</div>
			</div>
			<input type="hidden" name="proxy_id" value="{$info['proxy_id']}">
			<div class="bottom">
				<div class="button-container">
					<input type="hidden" name="id" value="{$info['id'] ?= $info['id']}" />
					<button type="submit" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit=""
						lay-filter="audit">
						<i class="layui-icon layui-icon-ok"></i>
						提交
					</button>
				</div>
			</div>
		</form>
		<script src="__ADMIN_PATH__/component/layui/layui.js"></script>
		<script src="__ADMIN_PATH__/component/pear/pear.js"></script>
		<script>
			layui.use(['form', 'jquery', 'popup', 'loading'], function() {
				let form = layui.form;
				let $ = layui.jquery;
				var popup = layui.popup;
				let loading = layui.loading;

				/**
				 * 表单提交
				 */
				form.on('submit(audit)', function(data) {
					$.ajax({
					    url:"{:url('do_fix')}",
					    type:"POST",
						dataType:"JSON",
						data:data.field,
						beforeSend: function () {
							loading.Load(1, "");
		                },
		                complete: function () {
		                	loading.loadRemove();
		                },
		                success:function(res)
		                {
		                	if(res.code == 0)
		                	{
		                		//正常业务
		                		popup.success(res.msg, function(){
		                			var index = parent.layer.getFrameIndex(window.name);
		                			parent.location.reload();
		                			parent.layer.close(index); //再执行关闭
	                        	});
		                	}else
		                	{
		                		//业务异常
		                		popup.warning(res.msg);
		                	}
		                },
		                error:function()
		                {
		                	loading.loadRemove();
		                	popup.failure('服务器错误');
		                }
		            });
		            return false;
		        });
			});
		</script>
	</body>
</html>